package com.tul.exercise.base.clazz.base.eg4;

/**
 * @author tul
 * 《java编程思想》 14章 示例4:泛化的class引用
 *
 */
public class GenericClassReferences {
    public static void main(String[] args) {
        Class intClass = int.class;


        Class<Integer> genericIntClass = int.class;
        genericIntClass = Integer.TYPE;

        // 非法的
        //genericIntClass = double.class;

        // 非法的
        //Class<Number> genericNumberClass = int.class;
        //Class<Number> genericNumberClass = Double.class;
        Class<? extends  Number> genericNumberClass = Double.class;
        genericNumberClass = int.class;
        genericNumberClass = Double.class;
    }
}
